# -*- coding:utf-8 -*-

"""
众安
"""
from aw import *
from autotest import *


class Test_zhongan_03(TestCase):
    def setUp(self):
        print("Test_001 setUp")

    def test(self):
        Common.writeRule2file("Test_zhongan_03")
        Common.setRule("Test_zhongan_13")

        expectVaule = """
FDT_LS00001	1014	FDT_LS00001福贷当前逾期	当前逾期笔数	当前逾期笔数>0	D	福贷-提现决策点1	D1
        """
        Common.checkResult(expectVaule, times=5, mode="TX")


        ruleStr = "当前逾期笔数=“新"
        Common.showRuleVariable(ruleStr)

        # 5 调用进件脚本
        Common.execFile(r'D:\dev\接口代码\AssetAutoTest\fudai\FDCreditChain.py')

        # 6 检查数据库结果
        expectVaule = {"result_code": "D1", "rule_result": "RD", "rule_code": "FDT_ZR00008"}
        Common.checkResult(expectVaule, times=5,mode="TX")

    def tearDown(self):
        print("Test_001 tearDown")
